# coding:utf-8 *_*

# @Author  :
# @Comment :  处理图片，转换为ico格式


import PythonMagick
import os

'''
图片转换icon格式
'''

path = os.getcwd()
filename = 'timg.jpg' #input('输入转化的完整图片名')
filepath = 'C:\\Users\\xxx\\Desktop\\sh.jpg'

img = PythonMagick.Image(filepath)
img.sample('256x256')

name = 'mmo.ico'
newpath = path + '//' + name
img.write(newpath)




